#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;
using System.Collections.ObjectModel;

namespace VIEWS // Virtual Earth Wrapper
{

/// <summary>Contains the route and itinerary information for a generated route. A VERoute object is returned to the callback when the VEMap.GetDirections Method is called.</summary>
public class VERoute : JSObject
{
	/// <summary>String holding JavaScript class name</summary>
	private static string thisClass = "VERoute";
	
	/// <summary>Get the JavaScript class name</summary>
	/// <returns type="String">The class name used in JavaScript </returns>		
	public override string ClassName
	{
		get { return thisClass; }
	}

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	public VERoute(ScriptObject so) : base(so) { }

	/// <summary name="Distance">A floating-point value that specifies the total length of the route.</summary>		
	public double Distance
	{
		get { return GetProperty<double>("Distance"); }
	}
	/// <summary name="RouteLegs">An array of VERouteLeg Class objects that specify the intermediate legs of the route.</summary>  
	public VERouteLeg[] RouteLegs
	{
		get
		{
			return ConvertToArray<VERouteLeg>(GetProperty<ScriptObject>("RouteLegs"));
		}
	}

    /// <summary name="ShapePoints">
    /// An array of VELatLong Class objects that identify the shape of the route.
    /// </summary>
    /// <remarks>The shape points are created for the highest zoom level, which means the closest to the ground. All use of route shape point data is restricted to customers who have received explicit permission and instructions about route shape points from Microsoft. </remarks> 
    public VELatLong[] ShapePoints
    {
        get
        {
            return ConvertToArray<VELatLong>(GetProperty<ScriptObject>("ShapePoints"));
        }
    }

	/// <summary name="Time">The total elapsed time, in seconds, to traverse the route.</summary>  
	public int Time
	{
		get { return GetProperty<int>("Time"); }
	}

   
} 

}
